package mt;

import java.util.Scanner;

/**
 * @author zhangmin
 * @create 2022-03-18 21:35
 */
public class meituan2021_3_3 {
    public static void main(String[] args) {
        Scanner cin=new Scanner(System.in);
        int n=cin.nextInt();
        cin.nextLine();
        for (int i = 0; i < n; i++) {
            String name=cin.nextLine();
            int len=name.length();
            if (len<2){
                System.out.println("Wrong");
                continue;
            }
            if(!Character.isLetter(name.charAt(0))){
                //首字母必须是字母
                System.out.println("Wrong");
                continue;
            }
            boolean hasnum=false,hasChar=false;
            for (int j = 0; j < len; j++) {
                char c=name.charAt(j);
                if (c>='A'&&c<='z'){
                    hasChar=true;
                }else if(c>='0'&&c<='9'){
                    hasnum=true;
                }else {
                    System.out.println("Wrong");
                    break;
                }
            }
            if(hasnum&&hasChar){
                System.out.println("Accept");
            }else {
                System.out.println("Wrong");
            }
        }
    }
}
